[#macro articleShowView]
<div class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>

    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-menu-item index="1">
            文章详情
        </el-menu-item>
    </el-menu>
    <div>
        <router-view></router-view>
    </div>

</div>
[/#macro]
[#macro articleShowConfig]
<script type="text/x-template" id="my-article-show">
    [@articleShowView /]
</script>
<script type="text/javascript">
    //显示组件开始
    var articleShowConfig = {};
    articleShowConfig.template = "#my-article-show";
    articleShowConfig.methods = config.basicMethod();
    articleShowConfig.data = function () {
        return {
            viewModel: {
            },
            activeIndex: "1"
        }
    };

    articleShowConfig.methods.handleSelect = function (index) {
        console.log(index)
        var selectId = this.selectId;
        if (index == "1") {
            this.$router.replace({ path: '/view/index', query: { id: selectId, activeIndex: 1, time: Math.random() } })
        }
        else if (index == "2") {
            this.$router.replace({ path: '/view/members', query: { id: selectId, activeIndex: 2, time: Math.random() } })
        } else {

        }
    };

    articleShowConfig.mounted = function () {
        var id = this.$route.query.id;
        var activeIndex = this.$route.query.activeIndex;

        var self = this;
        var data = {};
        data.id = id;
        this.selectId = data.id;
        if (activeIndex) {
            this.activeIndex = activeIndex;
        }
    }
    var articleShowView = Vue.component('my-article-view', articleShowConfig);
		//显示组件结束
</script>
[/#macro]



[#macro childArticleView]
<div>
    <el-form class="viewForm" label-width="80px">
        <el-col :span="22">
            <el-form-item label="标题">
                <div v-html="viewModel.title">></div>
            </el-form-item>
        </el-col>
        <el-col :span="22">
            <el-form-item label="封面">
                <img :src="viewModel.logo" style="height: 100px;width: auto;" />
            </el-form-item>
        </el-col>
        <el-col :span="22">
            <el-form-item label="文章分类">
                <div v-html="viewModel.articleCatalogName">></div>
            </el-form-item>
        </el-col>
        <el-col :span="22">
            <el-form-item label="文章内容">
                <div v-html="viewModel.note">></div>
            </el-form-item>
        </el-col>
    </el-form>
</div>
[/#macro]

[#macro childArticleConfig]
<script type="text/x-template" id="child-article-show">
        [@childArticleView /]
    </script>
<script type="text/javascript">

    var childArticleShowConfig = {};
    childArticleShowConfig.template = "#child-article-show";
    childArticleShowConfig.methods = config.basicMethod();
    childArticleShowConfig.data = function () {
        return {
            viewModel: {
            }
        }
    };
    childArticleShowConfig.mounted = function () {
        var id = this.$route.query.id;
        var self = this;
        var data = {};
        data.id = id;
        this.postData("${siteurl}tenantRest/article/view.htm", data, function (res) {
            if (res.code == 0) {
                self.viewModel = res;

            }
        });
    }
    var childArticleShowView = Vue.component('child-article-show', childArticleShowConfig);
</script>
[/#macro]